import scrapy


class TcSpider(scrapy.Spider):
    name = "tc"
    allowed_domains = ["nn.58.com"]
    start_urls = ["https://nn.58.com/sou/?key=%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91"]

    def parse(self, response):
        # 字符串
        # content = response.text

        # 二进制
        # content = response.body

        span = response.xpath('//div[@id="filter"]/div[@class="tabs"]/a/span')

        print('测试信息====span==================')
        print(len(span))
        print('测试信息====111span==================')
        # print(span.extract())
        response.extract_first()
